package com.twang.stock.controller.user;

import com.twang.stock.entity.DfcfBanKuaiMaoLiLv;
import com.twang.stock.service.CompanyStockService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

/**
 * 自选
 */
@Controller
@RequestMapping(value = "/")
@Slf4j
public class ZiXuanChiController {
    @Autowired
    private CompanyStockService companyStockService;

    @RequestMapping(value = "/ziXuanChi")
    public ModelAndView zhangTingBan() throws Exception {
        ModelAndView modelAndView = new ModelAndView();
        List<DfcfBanKuaiMaoLiLv> companyStocksList = companyStockService.query();
        modelAndView.addObject("companyStocksList", companyStocksList);
        modelAndView.setViewName("ziXuan/index");
        return modelAndView;
    }
}
